package cn.tedu_two;

public class Test2 {
    public static void main(String[] args) {
        B b=B.get();
    }
}
class B{
    private B(){}
    static private B x;
    static public B get(){
        synchronized(B.class){
            if(x==null){
                x=new B();
            }
            return  x;
        }
    }
}